<% breadcrumb.add @email.subject %>
<%= render 'backend/breadcrumbs' %>

<div class="row">
  <div class="col-md-6">
    <div class="card">
      <div class="card-header">
        <%= t 'b.sender' %>
      </div>

      <div class="card-block">
        <dl>
          <dt><%= t 'b.name' %></dt>
          <dd><%= @email.from_name %></dd>

          <dt><%= t 'b.email' %></dt>
          <dd><%= mail_to @email.from_email%></dd>
        </dl>
      </div>
    </div>
  </div>

  <div class="col-md-6">
    <div class="card">
      <div class="card-header">
        <%= t 'b.recipient' %>
      </div>

      <div class="card-block">
        <dl>
          <dt><%= t 'b.name' %></dt>
          <dd><%= @email.to_name %></dd>

          <dt><%= t 'b.email' %></dt>
          <dd><%= mail_to @email.to_email%></dd>
        </dl>
      </div>
    </div>
  </div>
</div>

<div class="row">
  <div class="col-sm-12">
    <div class="card">
      <div class="card-header">
        <%= t 'b.html_content' %>
      </div>

      <div class="card-block">
        <iframe src="<%= html_content_backend_email_path(@email) %>" height="400" width="100%" frameborder="0"></iframe>
      </div>
    </div>
  </div>
</div>

<div class="row">
  <div class="col-sm-12">
    <div class="card">
      <div class="card-header">
        <%= t 'b.plain_content' %>
      </div>

      <div class="card-block">
        <pre><%= @email.plain_content %></pre>
      </div>
    </div>
  </div>
</div>
